The present invention relates to a data processing apparatus comprising a disk apparatus for recording and reproducing a large amount of continuous multimedia data including digital audiovisual information (herein also maybe referred to as xe2x80x9cAV dataxe2x80x9d) in a personal computer (hereinafter simply referred to as a xe2x80x9cPCxe2x80x9d) and a home-use multimedia apparatus or the like, and to a file management method therefor.
Conventionally, audiovisual information has been recorded and reproduced mainly on magnetic tape. However, in accordance with the progress in the recent digital technology, a system of recording audiovisual information by using digital signals has become the dominant recording system instead of the recording system using analog signals. On the other hand, the range of uses for recording and reproducing AV data in real time by using the PC is increasing because of the rapid widespread proliferation of the PC and the development and practical utilization of a disk apparatus with built-in mass-storage disk media. In other words, a data processing apparatus including the PC is strongly requested to be able to easily carry out data processing, such as storage, editing and treatment, in accordance with the above-mentioned progress in technology. In the case of the above-mentioned data processing, a file system under the management of a known operating system (hereinafter referred to as an xe2x80x9cOSxe2x80x9d) installed ordinarily in the PC for example is used as a file management method for the AV data.
A file system included in a typical OS used for the PC is taken here as an example to explain a conventional file management method.
In order to carry out a file management, it is necessary to execute management to find out where a physical position of data recorded in a file is stored on the recording medium (disk medium) of the disk apparatus. On the other hand, the area of the recording medium of the disk apparatus is usually divided into units each referred to as a sector. Continuous logical block addresses (hereinafter each referred to as an xe2x80x9cLBAxe2x80x9d) are assigned to the individual sectors, so that the disk apparatus deals with its whole area as a single linear area. Therefore, the LBA on the disk apparatus corresponding to the head position of the data, for example, is controlled by the file management in the physical position of data recorded in the file.
Generally, data is divided into a plurality of fixed-length blocks (usually referred to as clusters), and a table indicating the correspondence of each cluster and an LBA on the disk apparatus is used for management. One cluster has a plurality of continuous sectors. The above-mentioned table is referred to as a file allocation table (hereinafter simply referred to as a xe2x80x9cFATxe2x80x9d). This FAT holds cluster chain information for linking divided plural clusters to form one file. Furthermore, this FAT is stored and disposed in a recording area different from the data recording area on the disk apparatus. After the PC is started, the FAT is read from the disk apparatus to the main storage apparatus.
The above-mentioned FAT will be described below more specifically referring to FIG. 11.
FIG. 11 is an explanatory view showing a concrete example of a FAT used for the conventional file management method.
In a conventional data processing apparatus, as shown in FIG. 11, a disk medium 100 has a plurality of recording areas, and the AV data and management information for managing the AV data are stored separately in the recording areas respectively corresponding thereto. In other words, the disk medium 100 is provided with recording areas 101 and 102 for storing the FAT and its copy, respectively, as shown in FIG. 11. Furthermore, the disk medium 100 is provided with a directory management portion 103 for holding plural pieces of file information, a recording area 104 for holding a copy of the directory management portion and a data storage area portion 105 for holding the AV data.
Each cluster of the conventional FAT holds the cluster chain information for indicating the cluster number of the link destination linked to the cluster. By referring to this FAT, clusters can be detected from one cluster to another, whereby it is possible to obtain the record positions of all the data constituting one file. More specifically, when the first cluster number of a file is 2, for example, cluster numbers 4, 3, 7, 6 and 5 can be obtained in sequence in accordance with the cluster chain information as shown in FIG. 11. A hexadecimal value xe2x80x9cFFFFxe2x80x9d shown in FIG. 11 indicates that the cluster holding this value is the last cluster. Furthermore, values to be stored as the cluster chain information in the FAT are 12-bit, 16-bit or 32-bit data, for example.
When a FAT using 16-bit cluster chain information is explained for example, the maximum value capable of being described as the cluster chain information is (2 raised to the 16th powerxe2x88x921=65,535). In this case, value 0 indicates that the cluster holding this value is a free cluster on the disk medium 100. Value 65535 (xe2x80x9cFFFFxe2x80x9d in hexadecimal notation) is used as a special value indicating that the cluster holding this value is the last cluster in the file. As a result, in the case of the FAT using 16-bit cluster chain information, the whole recording area of the disk medium 100 is divided into 65534 clusters and managed. In addition, in the conventional file management method using this FAT, numbers are assigned to clusters, beginning with its head cluster in sequence, to manage the correspondence of the numbers to the LBAs on the disk apparatus. More specifically, each LBA on the disk apparatus can be obtained by (the cluster number corresponding to the LBA)xc3x97(the number of sectors per cluster)+(offset LBA). The offset LBA mentioned above is an LBA assigned to the head position of the data storage area portion 105.
In the conventional data processing apparatus, the file management is carried out by the conventional file management method using the above-mentioned FAT. In the conventional data processing apparatus and the file management method therefor, the FAT is read from the disk apparatus to the main storage apparatus after the apparatus is started. Therefore, in the conventional data processing apparatus and the file management method therefor, when target data is read and/or written on the disk apparatus, the data is read and/or written at high speed referring to the FAT having been read in the main storage apparatus, instead of the FAT on the disk apparatus.
However, the above-mentioned conventional data processing apparatus and file management method therefor cause the following problem. That is to say, in the case of the above-mentioned prior art, the FAT on the disk apparatus is updated after file writing, namely, after file closing. Therefore, if an electric power to the PC or the disk apparatus is shut off during file writing, the FAT on the disk apparatus is not updated. As a result, even if a part of file data at the file writing has been recorded on the disk apparatus before power shut-off, the file management information including the FAT is not updated to that corresponding to the recorded data. This cause a problem of unable to judge which file data corresponds to the data recorded on the disk apparatus, and the file data at the file writing in the power shut-off cannot be read at all.
In order to solve this problem, it may be possible to use a method of frequently updating the FAT on the disk apparatus. However, in the case of this method, both the recording area for holding management information such as the FAT and the recording area for holding data must be accessed frequently and alternatively in the disk apparatus. Particularly when real-time data such as the AV data is recorded while accessing two recording areas alternatively in the disk apparatus, the performance of the real-time processing is impaired fatally. This method is thus not effective.
Furthermore, it may be possible to use a method of coping with the power shut-off by using an uninterruptible power supply or the like. However, such an uninterruptible power supply is generally expensive, and used only for limited types of apparatuses such as servers.
Moreover, even if a new file management method capable of solving the problems encountered in the conventional file management method is devised, a file system is included as a function of the OS in the case of the conventional data processing apparatus. Therefore, the OS installed on the PC must be changed or upgraded for example, in order to use the new file management method for the conventional data processing apparatus. This causes another problem.
The object of the present invention is to provide a data processing apparatus and file management method therefor that can solve the aforementioned problems in the conventional data processing apparatus and file management method therefor.
In order to achieve the above-mentioned object, a data processing apparatus comprises:
a disk apparatus for dividing data of a file into plural blocks and recording the plural blocks on a disk medium,
a program storage apparatus for storing programs,
a central processing unit for executing the programs, and
an interface for connecting the disk apparatus, the program storage apparatus and the central processing unit,
wherein, when each piece of data in one of the plural blocks is recorded as a data portion on the disk medium, continuous ID numbers are assigned to the individual continuous blocks, each of the assigned ID numbers is stored in an ID portion of a sub-code portion, address information indicating a recording position of the head of at least the next block is stored in a link portion of the sub-code portion, and the sub-code portion is recorded together with the data portion of the block on the disk medium.
According to this configuration, the continuity of blocks can be judged easily by reading the link portion each of the plural blocks in sequence, and by comparing the respective ID numbers each of the ID portion with one another. As a result, continuous blocks are judged as one file, whereby the management information of the file can be recovered, and the data of the file can be read.
A data processing apparatus according to another aspect of the invention comprises:
a disk apparatus for dividing data of a file into plural blocks and recording the plural blocks on a disk medium,
a program storage apparatus for storing programs,
a central processing unit for executing the programs, and
an interface for connecting the disk apparatus, the program storage apparatus and the central processing unit,
wherein, when each piece of data in one of the plural blocks is recorded as a data portion on the disk medium, a unique ID number is assigned to the blocks of each file, the assigned ID number is stored in an ID portion of a sub-code portion, address information indicating a recording position of the head of at least the next block is stored in a link portion of the sub-code portion, and the sub-code portion is recorded together with the data portion of the block on the disk medium.
According to this configuration, the continuity of blocks can be judged easily by reading the link portion each of the plural blocks in sequence, and by comparing the respective ID numbers each of the ID portion. As a result, continuous blocks are judged as one file, whereby the management information of the file can be recovered, and the data of the file can be read.
A data processing apparatus according to another aspect of the invention further comprises an input portion for inputting audiovisual information and an output portion for outputting said audiovisual information.
According to this configuration, the continuity of data blocks of audiovisual information can be judged easily.
A data processing apparatus according to another aspect of the invention, wherein the disk apparatus comprises a second program storage apparatus for storing a file management program for managing the file and a program execution apparatus for executing the file management program, and
a file management interface for connecting the disk apparatus to the central processing unit is provided to carry out the file management in the disk apparatus.
According to this configuration, the file management method can be changed easily without changing or upgrading an operating system.
A data processing apparatus according to another aspect of the invention, wherein a write-open flag indicating whether a file recorded on the disk medium is opened in a data writing ready condition or not is recorded in file information to be created for each file as file management information of the file.
According to this configuration, a file undergone ending in the middle of writing can be detected quickly.
A data processing apparatus according to another aspect of the invention, wherein a copy of the sub-code portion is created in units of blocks and recorded together with the data portion and the sub-code portion of the corresponding block in the disk apparatus.
According to this configuration, even if a specific sub-code portion cannot be read because of a defective area generated on the disk medium, required data portion can be read by referring to the copy of the sub-code portion, whereby data processing can be continued automatically.
A data processing apparatus according to another aspect of the invention, wherein a block size to be recorded on the disk medium is determined for each file.
According to this configuration, it is possible to prevent invalid areas from generating on the disk medium.
A data processing apparatus according to another aspect of the invention, wherein the central processing unit obtains a minimum transfer speed which is not less than the transfer speed of data to be recorded, of the disk apparatus, and determines said block size to be recorded on the disk medium on the basis of a continuous writing size uniquely determined for the obtained minimum transfer speed.
According to this configuration, the block size of data to be recorded on the disk medium becomes appropriate to the requested transfer speed of the data, whereby it is possible to ensure the above-mentioned transfer speed.
A data processing apparatus according to another aspect of the invention, wherein the link portion holds address information indicating recording positions of the heads of the blocks ahead of and next to the block corresponding to the link portion.
According to this configuration, data reading can be carried out easily in both the normal and reverse directions without causing any burden on the processing at the central processing unit. As a result, it is possible to carry out smooth rewinding reproduction.
A data processing apparatus according to another aspect of the invention, wherein the program execution apparatus prefetches plural blocks on the basis of the link portion each of the plural blocks and stores the blocks in the program storage apparatus.
According to this configuration, data prefetch can be made very effectively. It is thus possible to configure a data processing apparatus for processing continuous media data in particular.
A data processing apparatus according to another aspect of the invention, wherein the program execution apparatus obtains minimum transfer speed, which is not less than the transfer speed of data to be recorded, of the disk apparatus, and determines the block size to be recorded on the disk medium on the basis of a continuous writing size uniquely determined for the obtained minimum transfer speed.
According to this configuration, the central processing unit is not required to grasp the characteristic of the disk apparatus to be connected, and the data transfer speed can be ensured easily.
A data processing apparatus according to another aspect of the invention, wherein the central processing unit outputs a program download command to the program execution apparatus to record a new file management program in the disk apparatus.
According to this configuration, updating to the new file management program can be attained by the central processing unit without changing or upgrading the operating system, whereby the file management method can be changed easily.
A file management method comprises:
a step of assigning continuous ID numbers to said individual continuous blocks,
a step of storing each of the assigned ID numbers in an ID portion of a sub-code portions,
a step of storing address information indicating a recording position of the head of at least the next block in a link portion of the sub-code portion, and
a step of recording the sub-code portion together with the data portion of the block on the disk medium.
According to this configuration, the continuity of blocks can be judged easily by reading the link portion each of the plural blocks in sequence, and by comparing the respective ID numbers each of the ID portion.
A file management method according to another aspect of the invention comprises:
a step of assigning a unique ID number to the blocks of each file,
a step of storing each of the assigned ID numbers in an ID portion of a sub-code portions,
a step of storing address information indicating a recording position of the head of at least the next block in a link portion of the sub-code portion, and
a step of recording the sub-code portion together with the data portion of the block on the disk medium.
According to this configuration, the continuity of blocks can be judged easily by reading the link portion each of the plural blocks in sequence, and by comparing the respective ID numbers each of the ID portion.
A file management method according to another aspect of the invention further comprises:
a step of comparing two of said ID numbers, and
a step of checking whether two blocks assigned with the respective ID numbers are continuous or not on the basis of the result of the comparison at the comparison step, and judging that the two blocks belong to the same file in the case when the two blocks are continuous, and that the two blocks belong to different files in the case when the two blocks are not continuous.
According to this configuration, the management information of the file can be recovered, and the data of the file can be read.
A file management method according to another aspect of the invention, wherein a write-open flag indicating whether a file recorded on the disk medium is opened in a data writing ready condition or not is recorded in file information to be created for each file.
According to this configuration, a file undergone ending in the middle of writing can be detected quickly.
A file management method according to another aspect of the invention, wherein a copy of the sub-code portion is created in units of blocks and recorded together with the data portion and the sub-code portion of the corresponding block in the disk apparatus.
According to this configuration, even if a specific sub-code portion cannot be read because of a defective area generated on the disk medium, required data portion can be read by referring to the copy of the sub-code portion, whereby data processing can be continued automatically.
A file management method according to another aspect of the invention, wherein a block size to be recorded on the disk medium is determined for each file.
According to this configuration, it is possible to prevent invalid areas from generating on the disk medium.
A file management method according to another aspect of the invention, wherein a minimum transfer speed, which is not less than the transfer speed of data to be recorded, of the disk apparatus is obtained, and the block size to be recorded on the disk medium is determined on the basis of a continuous writing size uniquely determined for the obtained minimum transfer speed.
According to this configuration, the block size of data to be recorded on the disk medium becomes appropriate to the requested transfer speed of data, whereby it is possible to ensure the above-mentioned transfer speed.
A file management method according to another aspect of the invention, wherein the link portion holds address information indicating recording positions of the heads of the blocks ahead of and next to the block corresponding to the link portion.
According to this configuration, data reading can be carried out easily in both the normal and reverse directions without causing any burden on the processing at the central processing unit. As a result, it is possible to carry out smooth rewinding reproduction.